home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / c01lab1.zip / SIMLATRS / BUOY_TES.A < prev    next >
Text File  |  1992-11-11  |  929b  |  40 lines

  1. with Buoy_Sensor_Interface; use Buoy_Sensor_Interface;
  2. with Console;
  3. procedure Buoy_Test is
  4.  
  5.   procedure Display is
  6.   begin
  7.     for I in BUOY_ID loop
  8.       Update(I);
  9.       Console.Put ("     Buoy ");
  10.       Console.Put (BUOY_ID'IMAGE(I));
  11.       Console.Put (": ");
  12.       Console.Put (FLOAT(Air_Temperature(I)), 3, 1);
  13.       Console.Put ("  ");
  14.       Console.Put (FLOAT(Water_Temperature(I)), 3, 1);
  15.       Console.Put ("  ");
  16.       Console.Put (FLOAT(Wind_Speed(I)), 2, 1);
  17.       Console.Put ("  ");
  18.       if Red_Light(I) = ON then
  19.         Console.Put ('R');
  20.       else
  21.         Console.Put (' ');
  22.       end if;
  23.       if Yellow_Light(I) = ON then
  24.         Console.Put ('Y');
  25.       else
  26.         Console.Put (' ');
  27.       end if;
  28.       Console.New_Line;
  29.     end loop;
  30.   end Display;
  31.  
  32. begin
  33.  
  34.   for I in 1..30 loop
  35.     Console.Put_Line ("Monitoring Buoy");
  36.     Display;
  37.   end loop;
  38.  
  39. end Buoy_Test;
  40.